<template>
	<view>
		<!-- 拉黑弹出款 -->
		<u-popup :show="lhshow" @close="lhclose" mode="center" :round="10">
			<view class="" style="padding: 30rpx 30rpx 0;">
				<view class="bigtext fonweight xiaohei" style="width: 550rpx;">
					拉黑后，对方将无法搜索到你，也 不能再给你发私信
				</view>
				<view class=" flexright" style="margin-top: 100rpx;">
					<view class="xiaohui sanshier margin_right3" @click="lhclose">取消</view>
					<view class="xiaolan sanshier fonweight">确定</view>
				</view>
			</view>
		</u-popup>
		<!-- 投诉拉黑弹框 -->
		<u-popup :show="show" @close="close">
			<view class="mainpadding">
				<view class="flexbetween">
					<view class="xiaohei sanshier ">孤独比酒暖°</view>
					<view class="" @click="close">
						<u-icon name="close"></u-icon>
					</view>
				</view>
				<view class="flexleft margin_top2">
					<view class="xiaohui strongtext margin_right1">ID号:tangguobutian</view>
					<image class="fuzhi" src="../static/image/system/fz.png" mode=""></image>
				</view>
				<view class="flexleft margin_top">
					<view class="" @click="jumper('/pages_homepage/jubao')">
						<view class="wbox " style="margin: auto;" >
							<u-icon name="error-circle-fill" size="22"></u-icon>
						</view>
						<view class="strongtext xiaohei margin_top1 textcenter">举报</view>
					</view>
					<view class="" style="margin-left: 40rpx;" @click="dklh">
						<view class="wbox">
							<u-icon name="close-circle-fill" size="22"></u-icon>
						</view>
						<view class="strongtext xiaohei margin_top1 textcenter">拉黑</view>
					</view>
					
				</view>
			</view>
		</u-popup>
		<!-- 头部 -->
		<view class="toubox dingwei">
			<view class="zuytu">
				<image src="../static/image/system/zybjt.png" mode=""></image>
			</view>
			<view class="flexbetween dingbu">
				<view class="" @click="fhsyy">
					<image class="dbicon" src="../static/image/system/fh.png" mode=""></image>
				</view>
				<view class="" @click="show = true">
					<image class="dbicon" src="../static/image/system/sd.png" mode=""></image>
				</view>
			</view>
		</view>
		<!-- 滚动头部 -->
		<view class="navbox" :style="'background-color: rgba(255, 255, 255,' + op +')'">
			<view class="status-bar" :style="'height:' + statusBarHeight + 'px'"></view>
			<view class="flexbetween" :style="'color: rgba(0, 0, 0,' + op +')'">
				<u-icon name="arrow-left" color="#000" size="22" v-if="op==1" @click="fhsyy"></u-icon>
			</view>
		</view>
		<view class="baibox mainpadding">
			<view class="flexleft">
				<image class="touxiang margin_right3" src="../static/image/system/vs.png" mode=""></image>
				<view class="labtn flexcenter margin_right2">
					<view class="margin_right1">
						<u-icon name="plus" color="#fff" size="14"></u-icon>
					</view>
					<view class="ershiba xiaobai">关注</view>
				</view>
				<!-- <view class="dhbtn ershiba xiaohei margin_right2">取消关注	</view> -->
				<view class="dhbtn ershiba xiaohei">私信</view>
			</view>
			<view class=" margin_top xiahuaxian">
				<view class="flexleft">
					<view class="xiaohei fonweight margin_right2" style="font-size: 48rpx;">孤独比酒暖°</view>
					<view class="xlbtn xiaolan smalltext margin_right1 flexcenter">在线</view>
					<view class="xlbtn xiaolan smalltext margin_right1 flexcenter">陪聊官</view>
				</view>
				<view class="flexleft margin_top2">
					<view class="xiaohui strongtext margin_right1">ID号:tangguobutian</view>
					<image class="fuzhi" src="../static/image/system/fz.png" mode=""></image>
				</view>
				<view class="margin_top ershiba xiaohui">
					我是画师 我是画师 我是画师 全民:buy夏 求图微博:buy夏 暂不接稿，我已经废了 画画报名VX:lingw0316【注明
				</view>
				<view class="flexleft margin_top flex_wrap">
					<view class="xhbtn flexcenter margin_right1">
						<image class="zhixiang margin_right1" src="../static/image/system/zx.png" mode=""></image>
						<view class="smalltext xiaohui">19岁</view>
					</view>
					<view class="xhbtn flexcenter">
						<view class="smalltext xiaohui">打篮球</view>
					</view>
				</view>
				<view class="flexleft margin_top">
					<view class="flexleft margin_right2">
						<view class="sanshier fonweight margin_right1">2034.2w</view>
						<view class="smalltext xiaohui margin_right1">获赞</view>
					</view>
					<view class="flexleft margin_right2" @click="tzgywm(0)">
						<view class="sanshier fonweight margin_right1">2034.2w</view>
						<view class="smalltext xiaohui margin_right1">关注</view>
					</view>
					<view class="flexleft" @click="tzgywm(1)">
						<view class="sanshier fonweight margin_right1">2034.2w</view>
						<view class="smalltext xiaohui margin_right1">粉丝</view>
					</view>
				</view>
			</view>
			<view class="tab_nav">
				<view class="navTitle" v-for="(item,index) in navList" :key="index">
					<view :class="{'active':isActive === index}" @click="checked(index)">
						{{item.title}}
					</view>
				</view>
			</view>
			<view class="" v-if="isActive == 1">
				<view class="margin_top" v-for="item in 3">
					<view class="flexleft">
						<image class="margin_right1 xiaotux" src="../static/image/system/vs.png" mode=""></image>
						<view class="">
							<view class="ershiba xiaohei">孤独比酒暖°</view>
							<view class="smalltext xiaohui margin_top1">6小时前</view>
						</view>
					</view>
					<view class="margin_top sanshier xiaohei">远处是风景，近处的才是人生.</view>
					<view class="flexleft flex_wrap">
						<view class="sanshis flexcenter margin_top" v-for="item in 3">
							<image class="dtbabb" src="../static/image/system/zybjt.png" mode=""></image>
						</view>
					</view>
					<view class="flexbetween margin_top">
						<view class="ershiw flexcenter">
							<view class="flexleft">
								<view class="dticon">
									<image src="../static/image/system/s.png" mode=""></image>
								</view>
								<view class="smalltext xiaohei">28</view>
							</view>
						</view>
						<view class="ershiw flexcenter">
							<view class="flexleft">
								<view class="dticon">
									<image src="../static/image/system/fx.png" mode=""></image>
								</view>
								<view class="smalltext xiaohei">28</view>
							</view>
						</view>
						<view class="ershiw flexcenter">
							<view class="flexleft">
								<view class="dticon">
									<image src="../static/image/system/xx.png" mode=""></image>
								</view>
								<view class="smalltext xiaohei">28</view>
							</view>
						</view>
						<view class="ershiw flexcenter">
							<view class="flexleft">
								<view class="dticon">
									<image src="../static/image/system/dz.png" mode=""></image>
								</view>
								<view class="smalltext xiaohei">28</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isActive: 0,
				navList: [{
					index: 0,
					title: '作品'
				}, {
					index: 1,
					title: "动态"
				}],
				statusBarHeight: 0,
				op: 0,
				show: false,
				lhshow: false
			}
		},
		onLoad() {
			uni.getSystemInfo({
				success: (res) => {
					this.statusBarHeight = res.statusBarHeight
				}
			})
		},
		onPageScroll(res) {
			let top = res.scrollTop
			let height = this.statusBarHeight + 44
			if (top <= height) {
				this.op = Math.round(top / height * 100) / 100
			} else {
				this.op = 1
			}
		},
		methods: {
			// 开起拉黑
			dklh(){
				this.show = false
				this.lhshow = true
			},
			jumper(url) {
				uni.navigateTo({
					url: url
				})
			},
			lhclose(){
				this.lhshow = false
			},
			close() {
				this.show = false
				// console.log('close');
			},
			// 跳转关注及粉丝
			tzgywm(i) {
				uni.navigateTo({
					url: '/pages_homepage/guanzhu?id=' + i
				})
			},
			checked(index) {
				this.isActive = index
			},
			fhsyy() {
				uni.navigateBack(1)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wbox{
		padding: 25rpx;
		border-radius: 50%;
		background-color: #f2f2f2;
	}
	.navbox {
		position: fixed;
		top: 0rpx;
		left: 0;
		right: 0;
		padding: 30rpx;
		background: #fff;
	}

	.dticon {
		width: 32rpx;
		height: 32rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.dtbabb {
		width: 224rpx;
		height: 224rpx;
	}

	.xiaotux {
		width: 64rpx;
		height: 64rpx;
		border-radius: 50%;
	}

	.tab_nav {
		background-color: #fff;
		display: flex;
		justify-content: center;
		align-items: center;
		padding-bottom: 11rpx;
	}

	.tab_nav .navTitle {
		height: 90rpx;
		line-height: 90rpx;
		width: 100%;
		text-align: center;
		font-size: 30rpx;
		font-weight: bold;
		color: #999999;
	}

	.active {
		font-size: 30rpx;
		color: #333333;
		font-weight: bold;
		position: relative;
	}

	.active::after {
		content: "";
		position: absolute;
		width: 36rpx;
		height: 6rpx;
		background: #000000;
		border-radius: 3rpx;
		background-size: 100% 100%;
		left: 0rpx;
		right: 0rpx;
		bottom: 0rpx;
		margin: auto;
	}

	.xhbtn {
		padding: 10rpx 20rpx;
		background: #F5F5F5;
		border-radius: 20rpx;
	}

	.zhixiang {
		width: 20rpx;
		height: 20rpx;
	}

	.fuzhi {
		width: 24rpx;
		height: 24rpx;
	}

	.xlbtn {
		width: 70rpx;
		height: 34rpx;
		border: 1rpx solid #2361FF;
	}

	.dhbtn {
		background: #F5F5F5;
		border-radius: 44rpx;
		padding: 30rpx 68rpx;
	}

	.labtn {
		width: 256rpx;
		height: 88rpx;
		background: #2361FF;
		border-radius: 44rpx;
	}

	.touxiang {
		width: 192rpx;
		height: 192rpx;
		border-radius: 50%;
	}

	.zuytu {
		width: 100%;
		height: 300rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.dingbu {
		background-size: 100% 100%;
		width: 100%;
		position: absolute;
		top: 40rpx;
		padding: 30rpx;
		left: 0;
		box-sizing: border-box;
	}

	.baibox {
		background: #FFFFFF;
		border-radius: 40rpx 40rpx 0 0;
	}

	.dbicon {
		width: 48rpx;
		height: 48rpx;
	}

	// .dingbu {

	// 	padding: 88rpx 30rpx 130rpx;
	// 	background-size: 100% 100%;
	// 	width: 100%;
	// 	background-image: url('../static/image/system/zybjt.png');
	// 	box-sizing: border-box;
	// }
</style>